package innerdemo;

/**
 * Created with IntelliJ IEDA.
 * Description:
 * User:86186
 * Date:2022-05-14
 * Time:1:29
 */
public class Person {
    String name;
    String gender;
    int age;
    public Person(String name, String gender, int age) {
        this.name = name;
        this.gender = gender;
        this.age = age;
    }

    @Override
    public String toString() {
        return "名字:"+name+"  性别:"+gender+"  年龄:"+age;
        /*"Person{" +
                "name='" + name + '\'' +
                ", gender='" + gender + '\'' +
                ", age=" + age +
                '}';*/
    }

    /* public void show(String name,String gender,int age){
            System.out.println("name:"+name+" gender:"+gender+" age:"+age);
        }*/
    public static void main(String[] args) {
        Person person = new Person("wenwen","男", 18);
        //person.show("wenwen","男", 18);
        System.out.println(person.toString());
    }
}